package com.zx.sa.common;

import com.google.common.collect.Lists;
import java.util.List;

public class ModelType {

    public static final String OLLAMA = "ollama";
    public static final String OPENAI = "openai";
    public static final String ZHIPUAI = "zhipuai";
    public static final String DASHSCOPE = "dashscope";
    public static final String DEFAULT = OLLAMA;

    public static List<String> getModels() {
        return Lists.newArrayList(OLLAMA, OPENAI, ZHIPUAI, DASHSCOPE);
    }

    public static String normalize(String modelType) {
        if (modelType == null) {
            return DEFAULT;
        }
        String normalized = modelType.toLowerCase();
        return switch (normalized) {
            case OLLAMA -> OLLAMA;
            case OPENAI -> OPENAI;
            case ZHIPUAI -> ZHIPUAI;
            case DASHSCOPE -> DASHSCOPE;
            default -> DEFAULT;
        };
    }
}
